/**
 * Created by apple on 2017/7/27.
 */
export default {
  getItem:function (key) {
    let value;
    try{
      value = localStorage.getItem(key)
    }catch (err){
      console.error("没有获取到相应的数据",err.message)
    }finally {
      return value
    }
  },
  setItem:function (key, value) {
    try{
      localStorage.setItem(key,value)
    }catch (err){
      if(__DEV__){
        console.error("没能设置数据",err.message)
      }
    }
  }
}




